package net.osweb.core.fw.entity;

import org.hibernate.cfg.ImprovedNamingStrategy;
/**
 * 表生成策略
 * @author jin_cool.cao
 *
 */
public class PrefixImprovedNamingStrategy extends ImprovedNamingStrategy {
	private static final long serialVersionUID = 3097086534970692039L;

	private String tablePrefix = "crmos_";

	private String columnPrefix = "";

	public PrefixImprovedNamingStrategy() {
	}

	@Override
	public String tableName(String tableName) {
		return tablePrefix + super.tableName(tableName);
	}

	@Override
	public String columnName(String columnName) {
		return columnPrefix + super.columnName(columnName);
	}

	@Override
	public String propertyToColumnName(String propertyName) {
		return columnPrefix + super.propertyToColumnName(propertyName);
	}
}
